<html>
<head>
<!--

va2epr-tnc software - terminal node controller software for va2epr-tnc
Copyright (C) 2012, 2013 Thomas Cort <linuxgeek@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

-->
  <title>Map</title>

  <script src="http://www.tomcort.com/OpenLayers/lib/OpenLayers.js"></script>
  <script type="text/javascript">

    var map, layer, markers; // layers
    var size, offset, icon; // marker info

    function init() {

      map = new OpenLayers.Map('map');
      layer = new OpenLayers.Layer.OSM("osm");
      markers = new OpenLayers.Layer.Markers("Markers");

      map.addLayer(layer);
      map.addLayer(markers);

      map.setCenter(
        new OpenLayers.LonLat(-75.7645, 45.455).transform(
          new OpenLayers.Projection("EPSG:4326"),
          map.getProjectionObject()
        ),
        12
      );    

      size = new OpenLayers.Size(21,25);
      offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
      icon = new OpenLayers.Icon('http://www.openlayers.org/dev/img/marker.png', size, offset);
    }

    function addMarker(lon,lat) {

      markers.addMarker
	(
			new OpenLayers.Marker(
				new OpenLayers.LonLat(lon,lat).transform
				(
					new OpenLayers.Projection("EPSG:4326"),
					map.getProjectionObject()
				),
				icon.clone()
			)
	);
    }

  </script>

  <style type="text/css">

    * {
      padding: 0;
      margin: 0;
    }

  </style>
</head>
<body onload="init()">
  <div id="map"></div>
</body>
</html>
